package io.github.bigbird0101.youyishi.code.event;

import io.github.bigbird0101.youyishi.code.CodeContent;
import io.github.bigbird0101.youyishi.code.compile.CodeMetadata;

import java.util.List;

/**
 * @author m15179835326@163.com
 * @date 2023-05-12 11:12
 */
public class CompileSuccessEvent extends CodeEvent {

    private final List<CodeContent<?>> codeContents;

    public CompileSuccessEvent(List<CodeContent<?>> codeContents, List<CodeMetadata> codeMetadataList) {
        super(codeMetadataList);
        this.codeContents=codeContents;
    }

    @Override
    @SuppressWarnings("unchecked")
    public List<CodeMetadata> getSource() {
        return (List<CodeMetadata>) super.getSource();
    }

    public List<CodeContent<?>> getCodeContents() {
        return codeContents;
    }
}
